Method and apparatus for downloading program by using hand shaking in digital signal processing

ABSTRACT

A method and apparatus are provided for downloading a program by using hand-shaking in a digital signal processor (DSP), in which the program stored at an external memory is downloaded to an internal memory by using the hand-shaking in an asynchronous system having a dual CPU, wherein current operation of the digital signal processor is temporarily held to shorten a downloading time.

BACKGROUND

[0001] 1. Field of the Invention

[0002] The present invention relates to a method and apparatus for downloading a program in a digital signal processor (DSP), more particularly, a DSP having a dual CPU employing hand shaking.

[0003] 2. Discussion of Related Art

[0004] At present, the number of handheld phone users is rapidly soaring and new products for various communicating systems and services are being introduced worldwide. New products includes Code Division Multiplex Access 2000 (CDMA 2000) and Wide-CDMA (W-CDMA) as third-generation communications. In Europe, GSM/GPRS products as the 2.5th generations have been developed successively. The third-generation communicating system requires high speed transmission, multimedia service and compatibility with other communication systems. As an example, a wireless terminal is supported by a dual mode, and related software requires several kinds of protocol stacks.

[0005] In these communication systems, a digital signal processor (DSP) is utilized to decentralize a load of a micro control unit (MCU). The DSP is a chip capable of performing a boot-loading and requires a driving program to perform actual operation. Such a driving program can be downloaded from a program stored at a memory connected to the micro control unit (MCU), and storing it at an internal program memory.

[0006] A problem in such a conventional system is that much time is needed to download the stored program because the DSP has to be reset, and then the desired program is downloaded, and after the downloading is completed, the DSP needs to be reset again to execute the downloaded program.

SUMMARY OF THE INVENTION

[0007] The present invention is directed to a method and apparatus for downloading a program, which is capable of shortening the time for downloading the program stored at an external memory.

[0008] According to an embodiment of the present invention, a method and apparatus are provided for downloading a program by using hand-shaking in a digital signal processor (DSP), in which the program stored at an external memory is downloaded to an internal memory by using the hand-shaking in an asynchronous system having a dual CPU.

[0009] According to the embodiment of the present invention, an apparatus for downloading a program performing a specific function by using a hand-shaking in a DSP comprises an external memory for storing the program; a micro control unit (MCU) for controlling an overall operation of system by using a given program, ordering a downloading command when there is a downloading key command from the outside, and performing a control in downloading the program stored at the external memory when a downloading preparation signal is received; a direct memory access controller (DMAC) for receiving a control of the MCU and performing a control to directly access to the external memory; a program download control logic for receiving the downloading command from the MCU, standing by till an operation of the DSP in the midst of the current operation is completed according to an internal state, transferring the downloading preparation signal to the MCU when the operation of DSP is completed, and outputting a read/write mode selection control signal; a multiplexer (MUX) coupled with the DSP and the external memory for selecting a connection to the DSP or the external memory in response to the read/write mode selection control signal of the program download control logic; and an internal program memory connected to an output terminal of the MUX for storing the program stored at the external memory by the control of MCU.

[0010] According to another embodiment of the present invention, a method of downloading a program by using a hand-shaking in a DSP, comprises the steps of temporarily holding the current operation of the DSP through a hand-shaking when a downloading start command is inputted from the outside, and downloading and storing to an internal memory the program stored at an external memory.

[0011] Preferably, the operation of DSP held is resumed when the downloading is completed, and a DMAC is employed to make a downloading speed rapid in downloading the program.

[0012] According to another embodiment of the present invention, a method of downloading a program by using a hand-shaking in a DSP in a system having an MCU and the DSP, comprises the steps of: applying a downloading command from the MCU to a program download control logic when a downloading start command is inputted from the outside; temporarily holding the DSP by transferring a hold request signal from the program download control logic to the DSP; and accessing to the program stored at an external memory by the MCU when the DSP is held, and downloading the program to an internal memory.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The embodiments of the present invention will become more apparent by the following descriptions of preferred embodiments taken in conjunction with the accompanying drawings, in which:

[0014]FIG. 1 is a schematic block diagram of an apparatus for downloading a program in a preferred embodiment of the present invention;

[0015]FIG. 2 is a flowchart showing a process of downloading a program in a preferred embodiment of the present invention; and

[0016]FIG. 3 is a state diagram of a program download control logic in a preferred embodiment of the present invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

[0017] Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

[0018]FIG. 1 is a schematic block diagram of an apparatus for downloading a program by using hand-shaking in a digital signal processing(DSP) system.

[0019] According to an embodiment of the present invention, an apparatus for downloading a program for performing a specific function using hand-shaking in a DSP includes an external memory 10 for storing the program; a direct memory access controller (DMAC) 12 for controlling access to the external memory 10; a micro control unit (MCU) 14 for controlling the overall operation of the system, including ordering a downloading command when an external downloading key is present, and performing downloading of the program stored at the external memory 10; a program download control logic 16 for receiving the downloading command from the MCU 14, standing by till the current operation of the DSP 18 is completed according to an internal state, transferring a downloading preparation signal to the MCU 14 when the operation of the DSP is completed, and outputting a read/write mode selection control signal; a multiplexer (MUX) 20 connected to the DSP 18 and the external memory 10 for selecting a connection to the DSP 18 or the external memory 10 in response to the read/write mode selection control signal of the program download control logic 16; and an internal program memory 22 connected to an output terminal of the MUX 20 for storing the program stored at the external memory 10 by the control of MCU 14.

[0020]FIG. 2 is a flowchart showing the downloading of a program in a preferred embodiment of the present invention.

[0021]FIG. 3 is a state diagram of a program download control logic in a preferred embodiment of the present invention.

[0022] An IDLE state is generally a stand-by state in which a program downloading command PdnCmd=0, and a REQUEST state is a state where the program downloading command PdnCmd=1 is received and held till the current operation of the DSP 18 is completed. A DOWNLOAD state is to output an acknowledgement signal PdnRdy=1 to perform downloading by the MCU 14 when the downloading preparation is completed. A RESUME state is a preparation state to resume the operation of the DSP 18 discontinued when the downloading is completed and a downloading release signal PdnCmd=0 is received.

[0023] A downloading operation in a preferred embodiment of the present invention will be described with reference to FIGS. 1 to 3.

[0024] In the operation of downloading a specific program stored at the external memory to the internal memory in the system having a dual CPU such as the MCU 14 and the DSP 18, a key of key manipulating part(not shown) is first manipulated by a user to input a key command to start downloading (step 101). When the key command is inputted, the MCU 14 receives the key command as an interrupt command to generate a code for a downloading in an interrupt service routine, and the program downloading command signal PdnCmd=1 is sent to the program download control logic 16 (step 102).

[0025] When the program download control logic 16 is under the IDLE state as shown in the program download logic state diagram of FIG. 3 and the program downloading command signal PdnCmd=1 is received, the program download control logic 16 sends a hold request command HOLD REQUET to the DSP 18 and it is changed to the REQUEST state waiting for a completion of the DSP 18 operation (step 103). Then, the DSP 18 transfers an operation completion signal to the program download control logic 16 when the current operation of DSP is completed (step 104). The program download control logic 16 is then changed to the DOWNLOAD state to send the program downloading preparation signal PdnRdy=1 to the MCU 14 (step 105).

[0026] The program download control logic 16 further sends a write mode selection control signal to the MUX 20 to be connected to a bus coupled with the external memory 10. Then, the MCU 14, which now has the authority to perform the downloading, downloads the program stored at the external memory 10 to the internal program memory 22 through the MUX 20, and stores it at the internal program memory 22. At this time, the MCU 14 may control the DMAC 12 so that the program stored at the external memory 10 is transferred directly to the internal program memory 22, separately from the MCU 14, to thereby make faster the downloading process. When such downloading is completed, the MCU 14 transmits the program downloading release signal PdnCmd=0 to the program download control logic 16 (step 106).

[0027] When the program download control logic 16 receives the program downloading release signal PdnCmd=0, it is changed to the RESUME state to generate and apply a read mode selection control signal to the MUX 20, and to apply a hold release signal to the DSP 18 for resuming the operation of the DSP 18 (step 107).

[0028] The MUX 20 connects the DSP 18 with the internal program memory 22 in response to the read mode selection control signal outputted from the program download control logic 16. The program download control logic 16 is provided with a retiming logic. According to this embodiment, the MCU 14 operates based on a 39 MHz clock and the DSP 18 operates based on a 65 MHz clock, the MCU 14 and the DSP 18 operate asynchronously. Therefore, retiming logic of the program download control logic 16 is used to have an interface signal between the MCU 14 and the DSP 18 synchronized.

[0029] As afore-mentioned, according to preferred embodiments of the present invention, a hand-shaking method is employed between an MCU and a DSP to download a program stored at an external memory to an internal program memory in a system having a dual CPU. A program download control logic is used to hold the DSP temporarily and progress a program downloading. The DSP held under the holding state is reset to resume its operation when the program downloading is completed. With this configuraiton, the program can be downloaded to the internal memory even in the midst of the DSP's operation so that a downloading time is shortened.

[0030] It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without deviating from the spirit or scope of the invention. Thus, it is intended that the present invention cover the modifications and variations of this invention provided they come within the scope of the appended claims and their equivalents. 

What is claimed is:
 1. An apparatus for downloading a program in a system having a digital signal processor (DSP), comprising: an external memory for storing the program; a micro control unit (MCU) for controlling an overall operation of the system, ordering a downloading command when there is a downloading key command from the outside, and performing downloading the program to an internal memory when a downloading preparation signal is received; a program download control logic for receiving the downloading command from the MCU, standing by till a current operation of the DSP is completed, transferring the downloading preparation signal to the MCU when the operation of the DSP is completed, and outputting a read/write mode selection control signal; and a multiplexer (MUX) connected with the DSP and the external memory for selecting a connection to the DSP or the external memory in response to the read/write mode selection control signal of the program download control logic.
 2. The apparatus of claim 1, further comprising a direct memory access controller (DMAC) for performing direct access to the external memory.
 3. A method of downloading a program in a system having a digital signal processor(DSP), comprising the steps of: temporarily holding a current operation of the DSP by a hand-shaking process when a downloading start command is inputted from the outside; and downloading and storing to an internal memory the program stored at an external memory.
 4. The method of claim 3, further comprising the step of resuming an operation of the DSP when the downloading is completed.
 5. The method of claim 4, wherein said step of downloading the program includes using a DMAC.
 6. A method of downloading a program in a system having a micro control unit (MCU) and a DSP, said method comprising the steps of: applying by the MCU a downloading command to a program download control logic when a downloading start command is inputted from the outside; temporarily holding the DSP by transferring a hold request signal from the program download control logic to the DSP; and accessing by the MCU to the program stored at an external memory when the DSP is held, and downloading the program to an internal memory.
 7. The method of claim 6, wherein said step of downloading includes using a direct memory access controller (DMAC).
 8. The method of claim 7, further comprising the steps of: sending a hold release signal from the program download control logic to the DSP; and resuming an operation of the DSP held, when a downloading release command from the MCU is sent to the program download control logic. 